﻿using System;
using System.Collections.Generic;
using System.Web;

/// <summary>
///WebBase 的摘要说明
/// </summary>
public class WebBase
{
    public static string WebName = " 两性健康";
    //public static string CaheKey = "";
    public static string WebUrl = "http://Sex.Vs2010.Com";

    public WebBase() { }

    public static string getimgurl(string url)
    {
        if (url.ToLower().IndexOf("http://") != -1)
        {
            return url;
        }
        if (url.Length > 0 && url.Substring(0, 1) == "/")
            return url;
        return "/" + url;
    }

    public static string GetShowUrl(object bodyid,object muluid,object addtime)
    {
        return "/" + Public.Config.StaticHtmlConfigs.GetConfig().SavePath.Replace("\\", "/") + "/" + muluid.ToString() + "/" + DateTime.Parse(addtime.ToString()).ToString("yyyyMM") + "/show-id" + bodyid.ToString() + ".html";
    }

    public static Forum.Web.Repository Repository
    {
        get { return Forum.Web.Repository.GetServices(); }
    }

    public static Forum.Web.CacheRepository CacheRepository
    {
        get { return Forum.Web.CacheRepository.GetServices(); }
    }

}
